package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the registered_px database table.
 * 
 */
@Entity
@Table(name="registered_px")
@NamedQuery(name="RegisteredPx.findAll", query="SELECT r FROM RegisteredPx r")
public class RegisteredPx implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="outpatient_id")
	private int outpatientId;

	private String ghblr;

	private BigDecimal ghzt;

	private BigDecimal kzfy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="registration_date")//pbdate
	private Date registrationDate;


	@Column(name="registration_money")
	private BigDecimal registrationMoney;
	
	@Column(name="ghzj")
	private BigDecimal ghzj;
	
	@Column(name="ghss")
	private BigDecimal ghss;
	
	@Column(name="ghzl")
	private BigDecimal ghzl;

	//bi-directional many-to-one association to CureCostPx
	@OneToMany(mappedBy="registeredPx")
	private List<CureCostPx> cureCostPxs;

	//bi-directional many-to-one association to MedicalNoticePx
	@OneToMany(mappedBy="registeredPx")
	private List<MedicalNoticePx> medicalNoticePxs;

	//bi-directional many-to-one association to MzcostDetailsRecordPx
	@OneToMany(mappedBy="registeredPx")
	private List<MzcostDetailsRecordPx> mzcostDetailsRecordPxs;

	//bi-directional many-to-one association to OutpatientRecord
	@OneToMany(mappedBy="registeredPx")
	private List<OutpatientRecord> outpatientRecords;

	//bi-directional many-to-one association to PrescriptionPx
	@OneToMany(mappedBy="registeredPx")
	private List<PrescriptionPx> prescriptionPxs;

	//bi-directional many-to-one association to DepartmentsPx
	@ManyToOne
	@JoinColumn(name="departments_id")
	private DepartmentsPx departmentsPx;

	//bi-directional many-to-one association to GhlxPx
	@ManyToOne
	@JoinColumn(name="ghlx_id")
	private GhlxPx ghlxPx;

	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="user_id")
	private User user;

	//bi-directional many-to-one association to MedicalCardPx
	@ManyToOne
	@JoinColumn(name="mzcard_id")
	private MedicalCardPx medicalCardPx;

	//bi-directional many-to-one association to YfChangerPx
	@OneToMany(mappedBy="registeredPx")
	private List<YfChangerPx> yfChangerPxs;

	public RegisteredPx() {
	}
	
	
	public BigDecimal getGhzj() {
		return ghzj;
	}
	
	
	public void setGhzj(BigDecimal ghzj) {
		this.ghzj = ghzj;
	}


	public BigDecimal getGhss() {
		return ghss;
	}


	public void setGhss(BigDecimal ghss) {
		this.ghss = ghss;
	}


	public BigDecimal getGhzl() {
		return ghzl;
	}


	public void setGhzl(BigDecimal ghzl) {
		this.ghzl = ghzl;
	}


	public int getOutpatientId() {
		return this.outpatientId;
	}

	public void setOutpatientId(int outpatientId) {
		this.outpatientId = outpatientId;
	}

	public String getGhblr() {
		return this.ghblr;
	}

	public void setGhblr(String ghblr) {
		this.ghblr = ghblr;
	}

	public BigDecimal getGhzt() {
		return this.ghzt;
	}

	public void setGhzt(BigDecimal ghzt) {
		this.ghzt = ghzt;
	}

	public BigDecimal getKzfy() {
		return this.kzfy;
	}

	public void setKzfy(BigDecimal kzfy) {
		this.kzfy = kzfy;
	}

	public Date getRegistrationDate() {
		return this.registrationDate;
	}

	public void setRegistrationDate(Date registrationDate) {
		this.registrationDate = registrationDate;
	}

	public BigDecimal getRegistrationMoney() {
		return this.registrationMoney;
	}

	public void setRegistrationMoney(BigDecimal registrationMoney) {
		this.registrationMoney = registrationMoney;
	}

	public List<CureCostPx> getCureCostPxs() {
		return this.cureCostPxs;
	}

	public void setCureCostPxs(List<CureCostPx> cureCostPxs) {
		this.cureCostPxs = cureCostPxs;
	}

	public CureCostPx addCureCostPx(CureCostPx cureCostPx) {
		getCureCostPxs().add(cureCostPx);
		cureCostPx.setRegisteredPx(this);

		return cureCostPx;
	}

	public CureCostPx removeCureCostPx(CureCostPx cureCostPx) {
		getCureCostPxs().remove(cureCostPx);
		cureCostPx.setRegisteredPx(null);

		return cureCostPx;
	}

	public List<MedicalNoticePx> getMedicalNoticePxs() {
		return this.medicalNoticePxs;
	}

	public void setMedicalNoticePxs(List<MedicalNoticePx> medicalNoticePxs) {
		this.medicalNoticePxs = medicalNoticePxs;
	}

	public MedicalNoticePx addMedicalNoticePx(MedicalNoticePx medicalNoticePx) {
		getMedicalNoticePxs().add(medicalNoticePx);
		medicalNoticePx.setRegisteredPx(this);

		return medicalNoticePx;
	}

	public MedicalNoticePx removeMedicalNoticePx(MedicalNoticePx medicalNoticePx) {
		getMedicalNoticePxs().remove(medicalNoticePx);
		medicalNoticePx.setRegisteredPx(null);

		return medicalNoticePx;
	}

	public List<MzcostDetailsRecordPx> getMzcostDetailsRecordPxs() {
		return this.mzcostDetailsRecordPxs;
	}

	public void setMzcostDetailsRecordPxs(List<MzcostDetailsRecordPx> mzcostDetailsRecordPxs) {
		this.mzcostDetailsRecordPxs = mzcostDetailsRecordPxs;
	}

	public MzcostDetailsRecordPx addMzcostDetailsRecordPx(MzcostDetailsRecordPx mzcostDetailsRecordPx) {
		getMzcostDetailsRecordPxs().add(mzcostDetailsRecordPx);
		mzcostDetailsRecordPx.setRegisteredPx(this);

		return mzcostDetailsRecordPx;
	}

	public MzcostDetailsRecordPx removeMzcostDetailsRecordPx(MzcostDetailsRecordPx mzcostDetailsRecordPx) {
		getMzcostDetailsRecordPxs().remove(mzcostDetailsRecordPx);
		mzcostDetailsRecordPx.setRegisteredPx(null);

		return mzcostDetailsRecordPx;
	}

	public List<OutpatientRecord> getOutpatientRecords() {
		return this.outpatientRecords;
	}

	public void setOutpatientRecords(List<OutpatientRecord> outpatientRecords) {
		this.outpatientRecords = outpatientRecords;
	}

	public OutpatientRecord addOutpatientRecord(OutpatientRecord outpatientRecord) {
		getOutpatientRecords().add(outpatientRecord);
		outpatientRecord.setRegisteredPx(this);

		return outpatientRecord;
	}

	public OutpatientRecord removeOutpatientRecord(OutpatientRecord outpatientRecord) {
		getOutpatientRecords().remove(outpatientRecord);
		outpatientRecord.setRegisteredPx(null);

		return outpatientRecord;
	}

	public List<PrescriptionPx> getPrescriptionPxs() {
		return this.prescriptionPxs;
	}

	public void setPrescriptionPxs(List<PrescriptionPx> prescriptionPxs) {
		this.prescriptionPxs = prescriptionPxs;
	}

	public PrescriptionPx addPrescriptionPx(PrescriptionPx prescriptionPx) {
		getPrescriptionPxs().add(prescriptionPx);
		prescriptionPx.setRegisteredPx(this);

		return prescriptionPx;
	}

	public PrescriptionPx removePrescriptionPx(PrescriptionPx prescriptionPx) {
		getPrescriptionPxs().remove(prescriptionPx);
		prescriptionPx.setRegisteredPx(null);

		return prescriptionPx;
	}

	public DepartmentsPx getDepartmentsPx() {
		return this.departmentsPx;
	}

	public void setDepartmentsPx(DepartmentsPx departmentsPx) {
		this.departmentsPx = departmentsPx;
	}

	public GhlxPx getGhlxPx() {
		return this.ghlxPx;
	}

	public void setGhlxPx(GhlxPx ghlxPx) {
		this.ghlxPx = ghlxPx;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public MedicalCardPx getMedicalCardPx() {
		return this.medicalCardPx;
	}

	public void setMedicalCardPx(MedicalCardPx medicalCardPx) {
		this.medicalCardPx = medicalCardPx;
	}


	public List<YfChangerPx> getYfChangerPxs() {
		return this.yfChangerPxs;
	}

	public void setYfChangerPxs(List<YfChangerPx> yfChangerPxs) {
		this.yfChangerPxs = yfChangerPxs;
	}

	public YfChangerPx addYfChangerPx(YfChangerPx yfChangerPx) {
		getYfChangerPxs().add(yfChangerPx);
		yfChangerPx.setRegisteredPx(this);

		return yfChangerPx;
	}

	public YfChangerPx removeYfChangerPx(YfChangerPx yfChangerPx) {
		getYfChangerPxs().remove(yfChangerPx);
		yfChangerPx.setRegisteredPx(null);

		return yfChangerPx;
	}

}